class User(object):
    def __init__(self, name):  # 构造函数
        print("__init__被调用")
        self.name = name

    def __str__(self):  # 重写str函数
        return f"我的名字是{self.name}"

    def __add__(self, other):
        return self.name + other.name

    def __eq__(self, other):
        return self.name == other.name


mia = User('mia')
jack = User('jace')
print(mia)
print(mia + jack)
print(1 == 2)
print(mia == jack)
